package com.link.base.wechat.basic.model;

/*
 * 微信公众平台(JAVA) SDK
 *
 * Copyright (c) 2014, Ansitech Network Technology Co.,Ltd All rights reserved.
 * http://www.ansitech.com/weixin/sdk/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import com.thoughtworks.xstream.annotations.XStreamAlias;

import java.io.Serializable;

/**
 * POST的XML数据包转换为消息接受对象
 *
 * <p>
 * 由于POST的是XML数据包，所以不确定为哪种接受消息，<br/>
 * 所以直接将所有字段都进行转换，最后根据<tt>MsgType</tt>字段来判断取何种数据
 * </p>
 */

/**
 * Copyright  hande Company. All Rights Reserved.
  * @author  yipeng.zhu@hand-china.com
 * @date:   2018/11/5 16:56
 * @version 1.0
 */
@XStreamAlias("xml")
public class InputMessage implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 开发者微信号
     */
    @XStreamAlias("ToUserName")
    private String toUserName;
    /**
     * 发送方帐号（一个OpenID）
     */
    @XStreamAlias("FromUserName")
    private String fromUserName;
    /**
     * 消息创建时间 （整型）
     */
    @XStreamAlias("CreateTime")
    private Long createTime;
    /**
     * text
     */
    @XStreamAlias("MsgType")
    private String msgType = "text";
    /**
     * 消息id，64位整型
     */
    @XStreamAlias("MsgID")
    private Long msgId;
    /**
     * 文本消息--文本消息内容
     */
    @XStreamAlias("Content")
    private String content;
    /**
     * 图片链接（由系统生成）
     */
    @XStreamAlias("PicUrl")
    private String picUrl;
    /**
     * 地理位置消息--- 地理位置维度
     */
    @XStreamAlias("LocationX")
    private String locationX;
    /**
     * 地理位置经度
     */
    @XStreamAlias("LocationY")
    private String locationY;
    /**
     * 地图缩放大小
     */
    @XStreamAlias("Scale")
    private Long scale;
    /**
     * 地理位置信息
     */
    @XStreamAlias("Label")
    private String label;
    /**
     * 用户地理位置---地理位置纬度
     */
    @XStreamAlias("Latitude")
    private String latitude;
    /**
     * 地理位置经度
     */
    @XStreamAlias("Longitude")
    private String longitude;
    /**
     *地理位置精度
     */
    @XStreamAlias("Precision")
    private String precision;
    /**
     * 链接消息--消息标题
     */
    @XStreamAlias("Title")
    private String title;
    /**
     * 消息描述
     */
    @XStreamAlias("Description")
    private String description;
    /**
     * 消息链接
     */
    @XStreamAlias("Url")
    private String url;
    /**
     * 语音信息 --语音消息媒体id，可以调用多媒体文件下载接口拉取数据
     */
    @XStreamAlias("MediaId")
    private String mediaId;
    /**
     * 语音格式，如amr，speex等
     */
    @XStreamAlias("Format")
    private String format;
    /**
     * 语音识别结果，UTF8编码
     */
    @XStreamAlias("Recognition")
    private String recognition;
    /**
     * 事件类型
     */
    @XStreamAlias("Event")
    private String event;
    /**
     * 事件KEY值
     */
    @XStreamAlias("EventKey")
    private String eventKey;
    /**
     * 二维码的ticket，可用来换取二维码图片
     */
    @XStreamAlias("Ticket")
    private String ticket;
    /**
     * 指菜单ID
     */
    @XStreamAlias("MenuId")
    private String menuId;

    /**
     * 领取优惠券事件 --卡券ID
     */

    @XStreamAlias("CardId")
    private String cardId;
    /**
     *  是否为转赠领取，1代表是，0代表否。
     */
    @XStreamAlias("IsGiveByFriend")
    private String isGiveByFriend;
    /**
     * 卡券Code码
     */
    @XStreamAlias("UserCardCode")
    private String userCardCode;
    /**
     *当IsGiveByFriend为1时填入的字段，表示发起转赠用户的openid
     */
    @XStreamAlias("FriendUserName")
    private String friendUserName;

    @XStreamAlias("OuterId")
    private String outerId;
    /**
     * 为保证安全，微信会在转赠发生后变更该卡券的code号，该字段表示转赠前的code
     */
    @XStreamAlias("OldUserCardCode")
    private String oldUserCardCode;
    /**
     * 用户删除会员卡后可重新找回，当用户本次操作为找回时，该值为1，否则为0
     */
    @XStreamAlias("IsRestoreMemberCard")
    private String isRestoreMemberCard;

    @XStreamAlias("IsRecommendByFriend")
    private String isRecommendByFriend;

    @XStreamAlias("SourceScene")
    private String sourceScene;
    /**
     * 领券用户的UnionId
     */
    @XStreamAlias("UnionId")
    private String unionId;

    /**
     * 核销来源。支持开发者统计API核销（FROM_API）、公众平台核销（FROM_MP）、卡券商户助手核销（FROM_MOBILE_HELPER）（核销员微信号）
     */
    @XStreamAlias("ConsumeSource")
    private String consumeSource;
    /**
     * 门店名称，当前卡券核销的门店名称（只有通过自助核销和买单核销时才会出现该字段）
     */
    @XStreamAlias("LocationName")
    private String locationName;
    /**
     * 核销该卡券核销员的openid（只有通过卡券商户助手核销时才会出现）
     */
    @XStreamAlias("StaffOpenId")
    private String staffOpenId;
    /**
     * 自助核销 时 ，用户输入的备注金额
     */
    @XStreamAlias("RemarkAmount")
    private String remarkAmount;
    /**
     * 开发者发起核销时传入的自定义参数，用于进行核销渠道统计
     */
    @XStreamAlias("OuterStr")
    private String outerStr;
    /**
     * 自助核销时，用户输入的验证码
     */
    @XStreamAlias("VerifyCode")
    private String verifyCode;
    /**
     * 门店ID，当前卡券核销的门店ID（只有通过卡券商户助手和买单核销时才会出现）
     */
    @XStreamAlias("LocationId")
    private String locationId;

    @XStreamAlias("MsgId")
    private String msgid;

    public String getMsgid() {
        return msgid;
    }

    public void setMsgid(String msgid) {
        this.msgid = msgid;
    }

    public String getConsumeSource() {
        return consumeSource;
    }

    public void setConsumeSource(String consumeSource) {
        this.consumeSource = consumeSource;
    }

    public String getLocationName() {
        return locationName;
    }

    public void setLocationName(String locationName) {
        this.locationName = locationName;
    }

    public String getStaffOpenId() {
        return staffOpenId;
    }

    public void setStaffOpenId(String staffOpenId) {
        this.staffOpenId = staffOpenId;
    }

    public String getRemarkAmount() {
        return remarkAmount;
    }

    public void setRemarkAmount(String remarkAmount) {
        this.remarkAmount = remarkAmount;
    }

    public String getOuterStr() {
        return outerStr;
    }

    public void setOuterStr(String outerStr) {
        this.outerStr = outerStr;
    }

    public String getVerifyCode() {
        return verifyCode;
    }

    public void setVerifyCode(String verifyCode) {
        this.verifyCode = verifyCode;
    }

    public String getLocationId() {
        return locationId;
    }

    public void setLocationId(String locationId) {
        this.locationId = locationId;
    }

    public String getUserCardCode() {
        return userCardCode;
    }

    public void setUserCardCode(String userCardCode) {
        this.userCardCode = userCardCode;
    }

    public String getFriendUserName() {
        return friendUserName;
    }

    public void setFriendUserName(String friendUserName) {
        this.friendUserName = friendUserName;
    }

    public String getOuterId() {
        return outerId;
    }

    public void setOuterId(String outerId) {
        this.outerId = outerId;
    }

    public String getOldUserCardCode() {
        return oldUserCardCode;
    }

    public void setOldUserCardCode(String oldUserCardCode) {
        this.oldUserCardCode = oldUserCardCode;
    }

    public String getIsRestoreMemberCard() {
        return isRestoreMemberCard;
    }

    public void setIsRestoreMemberCard(String isRestoreMemberCard) {
        this.isRestoreMemberCard = isRestoreMemberCard;
    }

    public String getIsRecommendByFriend() {
        return isRecommendByFriend;
    }

    public void setIsRecommendByFriend(String isRecommendByFriend) {
        this.isRecommendByFriend = isRecommendByFriend;
    }

    public String getSourceScene() {
        return sourceScene;
    }

    public void setSourceScene(String sourceScene) {
        this.sourceScene = sourceScene;
    }

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public String getIsGiveByFriend() {
        return isGiveByFriend;
    }

    public void setIsGiveByFriend(String isGiveByFriend) {
        this.isGiveByFriend = isGiveByFriend;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public String getToUserName() {
        return toUserName;
    }

    public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }

    public String getFromUserName() {
        return fromUserName;
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public Long getMsgId() {
        return msgId;
    }

    public void setMsgId(Long msgId) {
        this.msgId = msgId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getLocationX() {
        return locationX;
    }

    public void setLocationX(String locationX) {
        this.locationX = locationX;
    }

    public String getLocationY() {
        return locationY;
    }

    public void setLocationY(String locationY) {
        this.locationY = locationY;
    }

    public Long getScale() {
        return scale;
    }

    public void setScale(Long scale) {
        this.scale = scale;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event;
    }

    public String getEventKey() {
        return eventKey;
    }

    public void setEventKey(String eventKey) {
        this.eventKey = eventKey;
    }

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public String getRecognition() {
        return recognition;
    }

    public void setRecognition(String recognition) {
        this.recognition = recognition;
    }

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getPrecision() {
        return precision;
    }

    public void setPrecision(String precision) {
        this.precision = precision;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
